package fuckTest.testif;

/**
 * @author senselyan
 * @Description: ${todo}
 * @date 2018/5/3 14:28
 */
public class Demo01 {

    public static void main(String[] args) {
        System.out.println(calculateRank(0l));
        System.out.println(calculateRank(25l));
        System.out.println(calculateRank(55l));
        System.out.println(calculateRank(111l));
        System.out.println(calculateRank(555l));
        System.out.println(calculateRank(1234l));
        System.out.println(calculateRank(5678l));
        System.out.println(calculateRank(11112l));
    }


    private static String calculateRank(Long score) {
        return (score < 0) ? "0%" : (score < 50) ? "15%" : score < 100 ? "32%" : score < 500 ? "46%" : score < 1000 ? "59%" : score < 5000 ? "68%" : score < 10000 ? "88%" : "96%";
    }
}
